<?php

use yii\db\Migration;

class m000000_000003_create_manager_role extends Migration
{
    public function up()
    {
        $this->createTable('{{%manager_role}}', [
            'id'=>$this->primaryKey(), // PK
            'name'=>$this->string(32), // 角色名称
            'remark'=>$this->text(), // 描述
        ]);
        $this->insert('{{%manager_role}}', [
            'id'=>1,
            'name'=>'系统管理员',
            'remark'=>'维护系统用。',
        ]);
    }

    public function down()
    {
        $this->dropTable('{{%manager_role}}');
    }
}
